﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGiIBLBackgroundTraitsData : OdGiBackgroundTraitsData
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGiIBLBackgroundTraitsData(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.OdGiIBLBackgroundTraitsData_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGiIBLBackgroundTraitsData obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGiIBLBackgroundTraitsData()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGiIBLBackgroundTraitsData(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public OdGiIBLBackgroundTraitsData() : this(GlobalsPINVOKE.new_OdGiIBLBackgroundTraitsData(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isEnabled()
		{
			bool result = GlobalsPINVOKE.OdGiIBLBackgroundTraitsData_isEnabled(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void enable(bool bSet)
		{
			GlobalsPINVOKE.OdGiIBLBackgroundTraitsData_enable(this.swigCPtr, bSet);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public string IBLFileName()
		{
			string result = GlobalsPINVOKE.OdGiIBLBackgroundTraitsData_IBLFileName(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setIBLFileName(string iblFileName)
		{
			GlobalsPINVOKE.OdGiIBLBackgroundTraitsData_setIBLFileName(this.swigCPtr, iblFileName);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double rotation()
		{
			double result = GlobalsPINVOKE.OdGiIBLBackgroundTraitsData_rotation(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setRotation(double angle)
		{
			GlobalsPINVOKE.OdGiIBLBackgroundTraitsData_setRotation(this.swigCPtr, angle);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool displayImage()
		{
			bool result = GlobalsPINVOKE.OdGiIBLBackgroundTraitsData_displayImage(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setDisplayImage(bool bSet)
		{
			GlobalsPINVOKE.OdGiIBLBackgroundTraitsData_setDisplayImage(this.swigCPtr, bSet);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbStub secondaryBackground()
		{
			IntPtr intPtr = GlobalsPINVOKE.OdGiIBLBackgroundTraitsData_secondaryBackground(this.swigCPtr);
			OdDbStub result = (intPtr == IntPtr.Zero) ? null : new OdDbStub(intPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setSecondaryBackground(OdDbStub secBkgndId)
		{
			GlobalsPINVOKE.OdGiIBLBackgroundTraitsData_setSecondaryBackground(this.swigCPtr, OdDbStub.getCPtr(secBkgndId));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool IsEqual(OdGiIBLBackgroundTraitsData data2)
		{
			bool result = GlobalsPINVOKE.OdGiIBLBackgroundTraitsData_IsEqual(this.swigCPtr, OdGiIBLBackgroundTraitsData.getCPtr(data2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool IsNotEqual(OdGiIBLBackgroundTraitsData data2)
		{
			bool result = GlobalsPINVOKE.OdGiIBLBackgroundTraitsData_IsNotEqual(this.swigCPtr, OdGiIBLBackgroundTraitsData.getCPtr(data2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
